<?php

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => '1折网 淘牛品 1zw taoniupin',
    'defaultController' => 'front/index',
    'language' => 'zh_cn',
    // preloading 'log' component
    'preload' => array('log'),
    'aliases' => array(
        'theme' => 'webroot.themes.76tui',
        'bootstrap' => 'application.modules.bootstrap',
    ),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
    ),
    'modules' => array(
        'admin' => array(
            'class' => 'application.modules.admin.AdminModule',
        ),
        'front' => array(
            'class' => 'application.modules.front.FrontModule',
        ),
        'user' => array(
            'class' => 'application.modules.user.UserModule',
        ),
        'app' => array(
            'class' => 'application.modules.app.AppModule',
        ),
        'bootstrap' => array(
            'class' => 'bootstrap.BootStrapModule'
        ),
        'api' => array(
            'class' => 'application.modules.api.ApiModule',
        ),
        'cron' => array(
            'class' => 'application.modules.cron.CronModule',
        ),
        'wap' => array(
            'class' => 'application.modules.wap.WapModule',
        ),
        'sso' => array(
            'class' => 'application.modules.sso.SsoModule',
        ),
    ),
    // application components
    'components' => array(
        'user' => array(
            // enable cookie-based authentication
            //'allowAutoLogin' => true,
            'class' => 'UserPassport',
        ),
        // uncomment the following to enable URLs in path-format
        /*
          'urlManager'=>array(
          'urlFormat'=>'path',
          'rules'=>array(
          '<controller:\w+>/<id:\d+>'=>'<controller>/view',
          '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
          '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
          ),
          ),
         */
        // uncomment the following to use a MySQL database
        'errorHandler' => array(
            // use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            // uncomment the following to show log messages on web pages
            /*
              array(
              'class'=>'CWebLogRoute',
              ),
             */
            ),
        ),
        'cache' => array(
            'class' => 'system.caching.CDummyCache',
        ),
        'bsHtml' => array(
            'class' => 'bootstrap.components.BSHtml'
        ),
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false, //隐藏index.php   
            'urlSuffix' => '.html', //后缀   
            'rules' => array(
                'k<gid:\d+>' => 'front/good/skip',
                'http://m.1zw.com<_q:.*>/*' => 'wap<_q>',
                'http://appapi.1zw.com<_q:.*>/*' => 'app<_q>',
                'g<gid:\d+>' => 'front/good/show',
                'cat/<cid:\d+>/*' => 'front/index/index',
                'index' => 'front/index/index',
                'jd' => 'front/cat/jd',
                'jj' => 'front/cat/jj',
                'cat-menu/<cid:\d+>' => 'front/cat/index',
                'tomorrow' => 'front/cat/tomorrow',
                'ycid/<cid:\d+>/*' => 'front/cat/yesterday',
                'baoming' => 'user/bm/bm',
                'query' => 'front/bm/lookup',
                'article/<id:\d+>' => 'front/article/show',
                'anquan/<id:\d+>' => 'front/article/anquan',
                'qing' => 'front/index/qing',
                'tmall' => 'front/index/tmall',
                'nohf' => 'front/index/nohf',
                'huodong' => 'front/cat/promotion',
                'sitemap' => 'front/index/sitemap',
                'jifen' => 'front/index/score',
                'shangjia' => 'front/special/index',
                'tag-<tag:\w+>' => 'front/index/tag',
                'zc' => 'front/index/zhuanchang',
        		's11' => 'front/lottery/index',
            ),
        ),
    ),
    'theme' => '1zw',
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
        // this is used in contact page
        'adminEmail' => '2428552416@qq.com',
        //静态文件(js,img等)访问地址，请以"/"结尾
        'staticUrl' => '/',
        //Authcode算法加密/解密密钥
        'authcode' => 'LdmsCx:2E+z[!kD"221N>Udd~3cdB{f9WS~@qZt]Tl/Vf&PM|0',
        'taoAPI' => array(
            'AppKey' => '21499153',
            'AppSecret' => '56590c6bcb55d8d7d101a4655f8c3493',
        ),
        'smtp' => array(
            'Host' => "smtp.exmail.qq.com",
            'SMTPAuth' => true,
            'Username' => "service31@1zw.com",
            'Password' => "yang1234qwe",
            'From' => "service31@1zw.com",
        ),
        'page_size' => array(
            'sault_index' => 40, //"首页"以及"栏目页"瀑布流 默认<单次>加载个数
            'sault_good' => 20, //商品详情页面的瀑布流默认<单次>加载个数
            'max_good' => 100, //商品详情页面的瀑布流默认<总>加载个数
        ),
        'sinaAPI' => array(
            'WB_AKEY' => "526570810",
            'WB_SKEY' => "c9d28a326bbfabf038352e7d8582b9b6",
            //'WB_CALLBACK_URL' => "http://cs.1zw.com/user/oauth/sina"
            'WB_CALLBACK_URL' => "http://www.1zw.com/user/oauth/sina"
        ),
        'QQAPI' => array(
            'appid' => "101142447",
            'appkey' => "6f13b2dfe294c93b3c632875ba3a37ce",
            'callback' => "http://www.1zw.com/user/oauth/qq",
            //'callback' => "http://cs.1zw.com/user/oauth/qq",
            //$_SESSION["scope"] = "get_user_info,add_share,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo";
            'scope' => "get_user_info,add_t,add_pic_t"
        ),
        //app客户端通信密钥
        'appKey' => array(
            'ios' => 'NcHFgytsfihwfn4L7qQ5VFVGvF4NtF3DP1CI6tLkFIv2v8ivfUY6WU0nkUC',
            'android' => '5AisMsAcl0oaShe1wt0p2b09BbLkFIv2v8ivfUY6WUGIfzR3Eoym6gYlepyk',
        ),
        //Redis配置
        'RedisConfig' => array(
            'host' => '10.168.184.117',
            'port' => 6379,
        ),
        //论坛同步
        'bbsInfo' => array(
            'key' => 'Kr7Vg0Hx3Hy2So5Zyb09BbLkFIv2v8ivfUY6WUG2Av6Om8Fw2Dw9Dr0Ay7',
            'url' => 'http://bbs.1zw.com/',
        ),
        //SSO
        'ssoconfig' => array(
            'client_id' => 1,
            'client_key' => 'FIv2v8ivfUY6WUGIfzKr7Vfn4L7qQ5VFVGvF4NtF3Dg0Hx3Hy2SoR3',
            'key_validity' => 300,
        ),
    ),
);
